import request from '@/utils/request'

const basePath = '/goods/spu'

export const saleableList = [
	{value: 1, label: '上架'},
	{value: 0, label: '下架'},
]

export const validList = [
	{value: 1, label: '有效'},
	{value: 0, label: '无效'},
]

export const GetVoById = id => {
	return request({
		url: `${basePath}/vo/${id}`,
		method: 'get',
	})
}

export const GetByTitle = title => {
	return request({
		url: `${basePath}/getByTitle/${title}`,
		method: 'get',
	})
}

export const GetListData = data => {
	return request({
		url: `${basePath}/list`,
		method: 'post',
		data,
	})
}

export const AddData = data => {
	return request({
		url: `${basePath}/add`,
		method: 'post',
		data,
	})
}

export const ModifyData = data => {
	return request({
		url: `${basePath}/modify`,
		method: 'post',
		data,
	})
}

export const DeleteData = data => {
	return request({
		url: `${basePath}/delete`,
		method: 'post',
		data,
	})
}

export const ModifySaleable = data => {
	return request({
		url: `${basePath}/modifySaleable`,
		method: 'post',
		data,
	})
}

export const ModifyValid = data => {
	return request({
		url: `${basePath}/modifyValid`,
		method: 'post',
		data,
	})
}
